1. Field of the Invention
This invention relates to computer memory arrangements and, more particularly, to methods for managing defects which occur during the operation of flash electrically erasable programmable read only memory (flash EEPROM) arrays.
2. History of the Prior Art
Modern computer systems make extensive use of long term memory. Typically this memory is provided by one or more hard (fixed) disks. A hard disk is an electromechanical device which includes one or more flat circular disks fixed to rotate rapidly about a central axis. Each flat disk has opposite surfaces which are coated with some form of magnetic material. A mechanical arm driven by electrical signals places a magnetic head over each side of each disk to write to positions on the disk or to read from those positions. These positions lie in sectors, a number of which (e.g., seventeen) form one complete track on one side of a disk. Each sector is capable of storing a fixed amount of data which is typically 512 bytes (256, 1024 or larger byte sectors are used in some disks). Depending on formatting, a single side of a disk may have over six hundred tracks. A typical disk drive used in personal computers today is capable of storing forty megabytes of data.
Such disk drives are very useful and have become almost a necessity to the operation of personal computers. However, such electro-mechanical drives do have their drawbacks. They are relatively heavy and increase the weight of a computer, especially a portable computer, significantly. They also are relatively bulky and require a significant amount of space within a computer. Their use requires a significant amount of the power and in a portable computer leads to significant battery power consumption. More importantly, electro-mechanical hard disk drives are very susceptible to shock. A hard drive within a portable computer which is dropped is quite likely to cease functioning. This can cause a catastrophic loss of data.
Recently, forms of long term storage other than electromechanical hard disks have become feasible for use in computers. One of these forms of long term storage is called flash EEPROM. Flash EEPROM memory is comprised of a large plurality of floating-gate metal-oxide-silicon field effect transistors arranged as memory cells in typical row and column fashion with circuitry for accessing individual cells and placing the memory transistors of those cells in one of two memory conditions. A flash memory cell, like a typical EPROM cell but in contrast to DRAM memory, retains information when power is removed. A flash EEPROM array has a number of characteristics which adapt it to use as long term memory. It is light in weight, occupies very little space, and consumes less power than electro-mechanical disk drives. More importantly, it is especially rugged. It will withstand without adverse effects repeated drops each of which would destroy a typical electromechanical hard disk.
A peculiarity of flash EEPROM is that it is erased by applying a high voltage simultaneously to the source terminals of all of the transistors (cells) used in the memory (or some sub-portion). Because these source terminals are all connected to one another by metallic busing in the array, the entire portion must be erased at once. While an electromechanical hard disk will typically store information in a first area of the disk and then rewrite that same area of the disk when the information changes, this is not possible with a flash memory array without erasing all of the valid information that remains in the array along with the invalid (dirty) information.
Because of this, a different arrangement is used for programming and erasing sectors of a flash EEPROM array. First, the entire array is divided into smaller separately erasable blocks so that when a block is erased the amount of valid data which must be reprogrammed is reduced. Then, when the information at a data entry changes, the changed information is written to a new sector on an available block rather than written over the old data; and the old data is marked dirty. When erasure occurs, all of the valid data in the block to be erased is written to a new block; and then the dirty block is erased and put back into use as a clean block of memory. Because of this involved erasure process, it typically takes as much as two seconds to erase a flash EEPROM array. However, because erasure need not occur with each entry which is rewritten, erasure may be delayed until a block contains a sufficient amount of dirty information so that erasure is feasible. This reduces the number of erasure operations to a minimum and allows erasure to occur in the background when the facilities for controlling the array are not otherwise occupied with reading and writing.
The requirement for free space to write to when data changes and when a block having dirty sectors is erased means that space in the data array must be available for these purposes at all times or the array will not function. This places a heavy burden on the management of the space available in the flash EEPROM memory array.
As with other memory arrangements, failures of flash EEPROM memory arrays can occur; and means must be provided for dealing with such failures as they occur. Certain apparent failures which flash memory arrays may experience are, in fact, typical of the operation of transistor memory devices. Many of these failures are not, in fact, failures of the memory devices or of the array. Consequently, to disable the array or a section of the array on the occurrence of such errors would be to disable circuitry capable of continued use. This is especially undesirable in memory such as flash memory which continually uses free space for writing and erasure operations. Other failures are such that some part of the array is no longer usable and should be taken out of use, preserving the data therein as well as possible. For this reason, it is desirable that the various types of failures which appear to occur in a flash memory array be handled in a manner which preserves the data stored in the array by the host while at the same time preserving the array itself for further operation.